/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package bank.account;

import java.util.Scanner;

/**
 *
 * @author Kerry
 */
public class BankAccount {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        System.out.println("Please enter your name");
        account.name = input.next();
        System.out.println(account.name + " ,please choose an option");
        while (1==1){
        
            System.out.println("1. Deposit");
            System.out.println("2. Withdraw");
            System.out.println("3. Check balance");
            int choice = input.nextInt();

            switch (choice){
                case 1:
                    System.out.println("Please enter amount to deposit");
                    double deposit = input.nextDouble();
                    account.amount = account.deposit(deposit);
                    System.out.println(account.name + " , your balance is: $" + account.amount);
                    break;

                case 2:
                    System.out.println("Please enter amount to withdraw");
                    double withdraw = input.nextDouble();
                    account.amount = account.withdraw(withdraw);
                    System.out.println(account.name + " , your balance is: $" + account.amount);
                    break;

                case 3:
                    System.out.println(account.name + ", your balance is: $" + account.amount);
                    break;
            }

        }         
    }
}
